import framework.Product;
/**
 * @Author:DarknessShadow
 * @description:
 * @date 2020/5/12 13:59
 */
public class MessageBox implements Product {
    private char docochar;
    public MessageBox(char docochar) {
        this.docochar = docochar;
    }
    @Override
    public void use(String s) {
        int length = s.getBytes().length;
        for (int i = 0; i < length + 4; i++) {
            System.out.print(docochar);
        }
        System.out.println("");
        System.out.println(docochar + " " + s + " " + docochar);
        for (int i = 0; i < length; i++) {
            System.out.print(docochar);
        }
        System.out.println("");
    }
    @Override
    public Product creatClone() {
        Product p = null;
        try {
            p = (Product) clone();
        } catch (Exception e) {
            e.printStackTrace();
        }
        return p;
    }
}
